package br.com.planseq.sgbl.view.utils
{
	import mx.controls.ComboBox;
	
	public class Functions
	{
		public function Functions()
		{
		}
		
		public static function SelecionarCombo(combo: ComboBox, txt: String):void {
			if (txt != "null" && txt != ""){
				var i: int = 0;
				for each (var obj:Object in combo.dataProvider) {
                  	if (obj.label == txt) {
						combo.selectedIndex = i;
                  	}
                  	i = i+1;
        		}
			} else {
    			combo.selectedIndex = -1
    		}
		}

	}
}